package com.niit.chat.controller;

import com.niit.chat.feign.SearchFeignClient;
import com.niit.chat.common.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/topbar")
public class SearchController {

    @Autowired
    private SearchFeignClient searchFeignClient;

    @GetMapping("/search")
    public Result<?> search(@RequestParam String type, @RequestParam String keyword) {
        return searchFeignClient.search(type, keyword);
    }
}
